// 服务商管理
import http from '../helper/http.js'
const path = '/api/adm/v1/'

// 服务商列表
export let providerList = (params) => {
  return http.post(`${path}partner/search`, params)
}

// 服务商余额提现
export let ptwithdraw = ({ verifyType, startTime, endTime, searchType, withdrawType, page, name, num }) => {
  return http.post(`${path}ptwithdraw/search`, {
    verify_type: verifyType, // 审核状态 0全部 1 未处理 2 已审核 3已拒绝
    start_time: startTime,
    end_time: endTime,
    search_type: searchType, // 0 所以符合条件  1 服务商id  2 服务商姓名 3 服务商手机号 4 流水号
    withdraw_type: withdrawType,
    name,
    page,
    num
  })
}

// 服务商余额提现列表提交审核接口
export let updatePtwithdraw = ({ id, memo, status }) => {
  return http.post(`${path}ptwithdraw/update`, {
    id,
    memo,
    status
  })
}

// 服务商余额详情
export let getPtwithdrawDetail = ({ id }) => {
  return http.post(`${path}ptwithdraw/show`, {
    id
  })
}

// 服务商保证金提现
export let ptdewithdraw = ({ verifyType, startTime, endTime, searchType, page, name, num }) => {
  return http.post(`${path}ptdewithdraw/search`, {
    verify_type: verifyType, // 审核状态 0全部 1 未处理 2 已审核 3已拒绝
    start_time: startTime,
    end_time: endTime,
    search_type: searchType, // 0 所以符合条件  1 服务商id  2 服务商姓名 3 服务商手机号 4 流水号
    name,
    page,
    num
  })
}

// 服务商保证金提现列表提交审核接口
export let updatePtdewithdraw = ({ id, memo, status }) => {
  return http.post(`${path}ptdewithdraw/update`, {
    id,
    memo,
    status
  })
}

// 服务商保证金余额提现详情
export let getPtdewithdrawDetail = ({ id }) => {
  return http.post(`${path}ptdewithdraw/show`, {
    id
  })
}
// 服务商充值记录 列表和筛选
export let ptrecharge = ({ type, payWay, searchType, name, startTime, endTime, page, num }) => {
  return http.post(`${path}ptrecharge/search`, {
    type, // 充值类型 0 全部 1:余额充值;2:保证金充值 3:加盟费
    pay_way: payWay, // 0 全部 1 手动 2 微信 3 支付宝
    search_type: searchType, // 0 全部 1 编号 2 姓名 3 手机号
    start_time: startTime,
    end_time: endTime,
    name,
    page,
    num
  })
}

// 邀请商户列表+筛选
export let inviteSearch = (params) => {
  return http.post(`${path}review/inviteSearch`, params)
}

// 邀请商户列表详情
export let inviteShowDetail = (params) => {
  return http.post(`${path}review/inviteShow`, params)
}

// 邀请商户列表详情-提交审核/api/adm/v1/review/submitAudit
export let submitAudit = (params) => {
  return http.post(`${path}review/submitAudit`, params)
}

// 商家类别选择
export let getCategoryTag = (data) => {
  return http.post(`${path}review/getCategoryTag`)
}
// 商家类别选择
export let getIndustry = (data) => {
  return http.post(`${path}review/getIndustry`)
}
// 上传商户图片
export let uploadImg = (params) => {
  return http.post(`${path}review/storeImage`, params, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

// 删除商户图片
export let deleteImage = (params) => {
  return http.post(`${path}review/deleteImage`, params)
}

// 邀请商户审核列表+筛选
export let verifySearch = (params) => {
  return http.post(`${path}review/verifySearch`, params)
}

// 邀请商户审核详情
export let verifyShowDetail = (params) => {
  return http.post(`${path}review/verifyShow`, params)
}

// 邀请商户审核-审核/拒绝 /api/adm/v1/review/verify
export let verify = (params) => {
  return http.post(`${path}review/verify`, params)
}

// 邀请商户上架列表+筛选
export let onlineSearch = (params) => {
  return http.post(`${path}review/onlineSearch`, params)
}

// 邀请商户上架详情
export let onlineShow = (params) => {
  return http.post(`${path}review/onlineShow`, params)
}

// 邀请商户 保存/上架
export let online = (params) => {
  return http.post(`${path}review/online`, params)
}
// 下载图片
export let downloadImage = (params) => {
  return http.post(`${path}review/downloadImage`, params)
}

// 获取会员列表
export let getMember = (params) => {
  return http.post(`${path}review/getMember`, params)
}
// 获取服务商列表
export let getPartner = (params) => {
  return http.post(`${path}review/getPartner`, params)
}

// 获取标签
export let getPictureTag = (params) => {
  return http.post(`${path}review/getPictureTag`, params)
}

// 修改商户资料-保存
export let inviteUpdate = (params) => {
  return http.post(`${path}review/inviteUpdate`, params)
}

// 服务商列表导出表格
export let exportList = (params) => {
  return http.post(`${path}partner/export`, params)
}

// /api/adm/v1/review/delete删除邀请商户列表
export let deleteInviteList = (params) => {
  return http.post(`${path}review/delete`, params)
}

// 加盟费充值--获取服务商信息
export let feeRecharge = (params) => {
  return http.post(`${path}ptrecharge/getPartner`, params)
}

// 服务商加盟费手动充值
export let part = (params) => {
  return http.post(`${path}ptrecharge/part`, params)
}

// 服务商列表详情页-主体信息/api/adm/v1/partner/body
export let partnerBody = (params) => {
  return http.post(`${path}partner/body`, params)
}

// 服务商列表详情页-主体信息-修改/api/adm/v1/partner/bodyUpdate
export let bodyUpdate = (params) => {
  return http.post(`${path}partner/bodyUpdate`, params)
}

// 服务商列表详情页-用户信息/api/adm/v1/partner/user
export let partnerUser = (params) => {
  return http.post(`${path}partner/user`, params)
}

// 服务商列表详情页-用户信息修改/api/adm/v1/partner/userUpdate
export let UserUpdate = (params) => {
  return http.post(`${path}partner/userUpdate`, params)
}

// 服务商列表详情页-团队信息  /api/adm/v1/partner/team
export let partnerTeam = (params) => {
  return http.post(`${path}partner/team`, params)
}

// 服务商列表详情页-团队信息-代理商详情 /api/adm/v1/partner/agent
export let partnerAgent = (params) => {
  return http.post(`${path}partner/agent`, params)
}

// 服务商列表详情页-团队信息-会员详情/api/adm/v1/partner/member
export let partnerMember = (params) => {
  return http.post(`${path}partner/member`, params)
}

// 服务商列表详情页-团队信息-商户详情/api/adm/v1/partner/merchant
export let partnerMerchant = (params) => {
  return http.post(`${path}partner/merchant`, params)
}

// 服务商列表详情页-团队信息-服务商详情/api/adm/v1/partner/partner
export let partnerPartner = (params) => {
  return http.post(`${path}partner/partner`, params)
}

// 服务商列表详情页-账户信息/api/adm/v1/partner/account
export let partnerAccount = (params) => {
  return http.post(`${path}partner/account`, params)
}

// 服务商余额提现列表-导出/api/adm/v1/ptwithdraw/export
export let ptwithdrawExport = (params) => {
  return http.post(`${path}ptwithdraw/export`, params)
}

// 收益信息/api/adm/v1/partner/commission
export let partnerCommission = (params) => {
  return http.post(`${path}partner/commission`, params)
}

// 加盟费详情列表/api/adm/v1/partner/participation
export let partnerParticipation = (params) => {
  return http.post(`${path}partner/participation`, params)
}

// 服务商列表保证金详情列表/api/adm/v1/partner/deposit
export let partnerDeposit = (params) => {
  return http.post(`${path}partner/deposit`, params)
}

// 服务商详情--结算信息/api/adm/v1/partner/bank
export let partnerBank = (params) => {
  return http.post(`${path}partner/bank`, params)
}

// 服务商详情--删除银行卡/api/adm/v1/partner/deleteBank
export let partnerDeleteBank = (params) => {
  return http.post(`${path}partner/deleteBank`, params)
}

// 服务商详情--添加银行卡/api/adm/v1/partner/bankStore
export let partnerBankStore = (params) => {
  return http.post(`${path}partner/bankStore`, params)
}

// 服务商详情--消息信息/api/adm/v1/partner/notice
export let partnerNotice = (params) => {
  return http.post(`${path}partner/notice`, params)
}

// 服务商草稿箱 /api/adm/v1/ptInviteDraft/search
export let ptInviteDraftSearch = (params) => {
  return http.post(`${path}ptInviteDraft/search`, params)
}

// 服务商草稿箱删除/api/adm/v1/ptInviteDraft/delete
export let ptInviteDraftDelete = (params) => {
  return http.post(`${path}ptInviteDraft/delete`, params)
}

// 服务商草稿箱详情//api/adm/v1/ptInviteDraft/show
export let ptInviteDraftShow = (params) => {
  return http.post(`${path}ptInviteDraft/show`, params)
}
